package registnet.dao;


import java.math.BigDecimal;
import java.sql.Connection;
import java.util.ArrayList;
import java.util.Date;
import java.util.Collections;
import java.util.List;

import org.apache.commons.lang.ObjectUtils;
import org.apache.torque.TorqueException;
import org.apache.torque.om.BaseObject;
import org.apache.torque.om.ComboKey;
import org.apache.torque.om.DateKey;
import org.apache.torque.om.NumberKey;
import org.apache.torque.om.ObjectKey;
import org.apache.torque.om.SimpleKey;
import org.apache.torque.om.StringKey;
import org.apache.torque.om.Persistent;
import org.apache.torque.util.Criteria;
import org.apache.torque.util.Transaction;

  
  
/**
 * This class was autogenerated by Torque on:
 *
 * [Tue Jun 30 14:38:16 PDT 2009]
 *
 * You should not use this class directly.  It should not even be
 * extended all references should be to Student
 */
public abstract class BaseStudent extends BaseObject
{
    /** The Peer class */
    private static final StudentPeer peer =
        new StudentPeer();

        
    /** The value for the studentId field */
    private int studentId;
      
    /** The value for the studentNumber field */
    private String studentNumber;
      
    /** The value for the firstName field */
    private String firstName;
      
    /** The value for the middleName field */
    private String middleName;
      
    /** The value for the lastName field */
    private String lastName;
      
    /** The value for the sex field */
    private String sex;
      
    /** The value for the birthDate field */
    private String birthDate;
                                          
    /** The value for the civilStatus field */
    private int civilStatus = 1;
                                                
    /** The value for the residentialAddress field */
    private String residentialAddress = "";
                                                
    /** The value for the collegeAddress field */
    private String collegeAddress = "";
                                                
    /** The value for the father field */
    private String father = "";
                                                
    /** The value for the mother field */
    private String mother = "";
                                                
    /** The value for the guardian field */
    private String guardian = "";
      
    /** The value for the guardianContactNumber field */
    private String guardianContactNumber;
      
    /** The value for the guardianAddress field */
    private String guardianAddress;
      
    /** The value for the guardianRelation field */
    private String guardianRelation;
      
    /** The value for the guardianEmail field */
    private String guardianEmail;
                                          
    /** The value for the isRGEP field */
    private int isRGEP = 1;
      
    /** The value for the zipcode field */
    private int zipcode;
      
    /** The value for the telephoneNumber field */
    private String telephoneNumber;
      
    /** The value for the cellphoneNumber field */
    private String cellphoneNumber;
                                                
    /** The value for the highSchool field */
    private String highSchool = "";
                                          
    /** The value for the highSchoolGrade field */
    private double highSchoolGrade = 0.00;
      
    /** The value for the email field */
    private String email;
                                          
    /** The value for the sTFAPBracket field */
    private int sTFAPBracket = 9;
      
    /** The value for the signature field */
    private byte[] signature;
      
    /** The value for the adviser field */
    private String adviser;
      
    /** The value for the citizenship field */
    private int citizenship;
      
    /** The value for the country field */
    private String country;
      
    /** The value for the curriculumId field */
    private int curriculumId;
      
    /** The value for the photo field */
    private byte[] photo;
  
    
    /**
     * Get the StudentId
     *
     * @return int
     */
    public int getStudentId()
    {
        return studentId;
    }

                                              
    /**
     * Set the value of StudentId
     *
     * @param v new value
     */
    public void setStudentId(int v) throws TorqueException
    {
    
                  if (this.studentId != v)
              {
            this.studentId = v;
            setModified(true);
        }
    
          
                                  
        // update associated StudentClassification
        if (collStudentClassifications != null)
        {
            for (int i = 0; i < collStudentClassifications.size(); i++)
            {
                ((StudentClassification) collStudentClassifications.get(i))
                    .setStudentId(v);
            }
        }
                                          
        // update associated StudentStanding
        if (collStudentStandings != null)
        {
            for (int i = 0; i < collStudentStandings.size(); i++)
            {
                ((StudentStanding) collStudentStandings.get(i))
                    .setStudentId(v);
            }
        }
                                          
        // update associated StudentAllowedUnits
        if (collStudentAllowedUnitss != null)
        {
            for (int i = 0; i < collStudentAllowedUnitss.size(); i++)
            {
                ((StudentAllowedUnits) collStudentAllowedUnitss.get(i))
                    .setStudentId(v);
            }
        }
                                          
        // update associated StudentCurriculumTotalUnitsEarned
        if (collStudentCurriculumTotalUnitsEarneds != null)
        {
            for (int i = 0; i < collStudentCurriculumTotalUnitsEarneds.size(); i++)
            {
                ((StudentCurriculumTotalUnitsEarned) collStudentCurriculumTotalUnitsEarneds.get(i))
                    .setStudentId(v);
            }
        }
                                          
        // update associated StudentPriority
        if (collStudentPrioritys != null)
        {
            for (int i = 0; i < collStudentPrioritys.size(); i++)
            {
                ((StudentPriority) collStudentPrioritys.get(i))
                    .setStudentId(v);
            }
        }
                                          
        // update associated PlanOfCourseWork
        if (collPlanOfCourseWorks != null)
        {
            for (int i = 0; i < collPlanOfCourseWorks.size(); i++)
            {
                ((PlanOfCourseWork) collPlanOfCourseWorks.get(i))
                    .setStudentId(v);
            }
        }
                                          
        // update associated Grade
        if (collGrades != null)
        {
            for (int i = 0; i < collGrades.size(); i++)
            {
                ((Grade) collGrades.get(i))
                    .setStudentId(v);
            }
        }
                                          
        // update associated RecommendedCourse
        if (collRecommendedCourses != null)
        {
            for (int i = 0; i < collRecommendedCourses.size(); i++)
            {
                ((RecommendedCourse) collRecommendedCourses.get(i))
                    .setStudentId(v);
            }
        }
                                          
        // update associated Slot
        if (collSlots != null)
        {
            for (int i = 0; i < collSlots.size(); i++)
            {
                ((Slot) collSlots.get(i))
                    .setStudentId(v);
            }
        }
                      }
  
    /**
     * Get the StudentNumber
     *
     * @return String
     */
    public String getStudentNumber()
    {
        return studentNumber;
    }

                        
    /**
     * Set the value of StudentNumber
     *
     * @param v new value
     */
    public void setStudentNumber(String v) 
    {
    
                  if (!ObjectUtils.equals(this.studentNumber, v))
              {
            this.studentNumber = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the FirstName
     *
     * @return String
     */
    public String getFirstName()
    {
        return firstName;
    }

                        
    /**
     * Set the value of FirstName
     *
     * @param v new value
     */
    public void setFirstName(String v) 
    {
    
                  if (!ObjectUtils.equals(this.firstName, v))
              {
            this.firstName = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the MiddleName
     *
     * @return String
     */
    public String getMiddleName()
    {
        return middleName;
    }

                        
    /**
     * Set the value of MiddleName
     *
     * @param v new value
     */
    public void setMiddleName(String v) 
    {
    
                  if (!ObjectUtils.equals(this.middleName, v))
              {
            this.middleName = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the LastName
     *
     * @return String
     */
    public String getLastName()
    {
        return lastName;
    }

                        
    /**
     * Set the value of LastName
     *
     * @param v new value
     */
    public void setLastName(String v) 
    {
    
                  if (!ObjectUtils.equals(this.lastName, v))
              {
            this.lastName = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the Sex
     *
     * @return String
     */
    public String getSex()
    {
        return sex;
    }

                        
    /**
     * Set the value of Sex
     *
     * @param v new value
     */
    public void setSex(String v) 
    {
    
                  if (!ObjectUtils.equals(this.sex, v))
              {
            this.sex = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the BirthDate
     *
     * @return String
     */
    public String getBirthDate()
    {
        return birthDate;
    }

                        
    /**
     * Set the value of BirthDate
     *
     * @param v new value
     */
    public void setBirthDate(String v) 
    {
    
                  if (!ObjectUtils.equals(this.birthDate, v))
              {
            this.birthDate = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the CivilStatus
     *
     * @return int
     */
    public int getCivilStatus()
    {
        return civilStatus;
    }

                        
    /**
     * Set the value of CivilStatus
     *
     * @param v new value
     */
    public void setCivilStatus(int v) 
    {
    
                  if (this.civilStatus != v)
              {
            this.civilStatus = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the ResidentialAddress
     *
     * @return String
     */
    public String getResidentialAddress()
    {
        return residentialAddress;
    }

                        
    /**
     * Set the value of ResidentialAddress
     *
     * @param v new value
     */
    public void setResidentialAddress(String v) 
    {
    
                  if (!ObjectUtils.equals(this.residentialAddress, v))
              {
            this.residentialAddress = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the CollegeAddress
     *
     * @return String
     */
    public String getCollegeAddress()
    {
        return collegeAddress;
    }

                        
    /**
     * Set the value of CollegeAddress
     *
     * @param v new value
     */
    public void setCollegeAddress(String v) 
    {
    
                  if (!ObjectUtils.equals(this.collegeAddress, v))
              {
            this.collegeAddress = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the Father
     *
     * @return String
     */
    public String getFather()
    {
        return father;
    }

                        
    /**
     * Set the value of Father
     *
     * @param v new value
     */
    public void setFather(String v) 
    {
    
                  if (!ObjectUtils.equals(this.father, v))
              {
            this.father = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the Mother
     *
     * @return String
     */
    public String getMother()
    {
        return mother;
    }

                        
    /**
     * Set the value of Mother
     *
     * @param v new value
     */
    public void setMother(String v) 
    {
    
                  if (!ObjectUtils.equals(this.mother, v))
              {
            this.mother = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the Guardian
     *
     * @return String
     */
    public String getGuardian()
    {
        return guardian;
    }

                        
    /**
     * Set the value of Guardian
     *
     * @param v new value
     */
    public void setGuardian(String v) 
    {
    
                  if (!ObjectUtils.equals(this.guardian, v))
              {
            this.guardian = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the GuardianContactNumber
     *
     * @return String
     */
    public String getGuardianContactNumber()
    {
        return guardianContactNumber;
    }

                        
    /**
     * Set the value of GuardianContactNumber
     *
     * @param v new value
     */
    public void setGuardianContactNumber(String v) 
    {
    
                  if (!ObjectUtils.equals(this.guardianContactNumber, v))
              {
            this.guardianContactNumber = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the GuardianAddress
     *
     * @return String
     */
    public String getGuardianAddress()
    {
        return guardianAddress;
    }

                        
    /**
     * Set the value of GuardianAddress
     *
     * @param v new value
     */
    public void setGuardianAddress(String v) 
    {
    
                  if (!ObjectUtils.equals(this.guardianAddress, v))
              {
            this.guardianAddress = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the GuardianRelation
     *
     * @return String
     */
    public String getGuardianRelation()
    {
        return guardianRelation;
    }

                        
    /**
     * Set the value of GuardianRelation
     *
     * @param v new value
     */
    public void setGuardianRelation(String v) 
    {
    
                  if (!ObjectUtils.equals(this.guardianRelation, v))
              {
            this.guardianRelation = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the GuardianEmail
     *
     * @return String
     */
    public String getGuardianEmail()
    {
        return guardianEmail;
    }

                        
    /**
     * Set the value of GuardianEmail
     *
     * @param v new value
     */
    public void setGuardianEmail(String v) 
    {
    
                  if (!ObjectUtils.equals(this.guardianEmail, v))
              {
            this.guardianEmail = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the IsRGEP
     *
     * @return int
     */
    public int getIsRGEP()
    {
        return isRGEP;
    }

                        
    /**
     * Set the value of IsRGEP
     *
     * @param v new value
     */
    public void setIsRGEP(int v) 
    {
    
                  if (this.isRGEP != v)
              {
            this.isRGEP = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the Zipcode
     *
     * @return int
     */
    public int getZipcode()
    {
        return zipcode;
    }

                        
    /**
     * Set the value of Zipcode
     *
     * @param v new value
     */
    public void setZipcode(int v) 
    {
    
                  if (this.zipcode != v)
              {
            this.zipcode = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the TelephoneNumber
     *
     * @return String
     */
    public String getTelephoneNumber()
    {
        return telephoneNumber;
    }

                        
    /**
     * Set the value of TelephoneNumber
     *
     * @param v new value
     */
    public void setTelephoneNumber(String v) 
    {
    
                  if (!ObjectUtils.equals(this.telephoneNumber, v))
              {
            this.telephoneNumber = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the CellphoneNumber
     *
     * @return String
     */
    public String getCellphoneNumber()
    {
        return cellphoneNumber;
    }

                        
    /**
     * Set the value of CellphoneNumber
     *
     * @param v new value
     */
    public void setCellphoneNumber(String v) 
    {
    
                  if (!ObjectUtils.equals(this.cellphoneNumber, v))
              {
            this.cellphoneNumber = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the HighSchool
     *
     * @return String
     */
    public String getHighSchool()
    {
        return highSchool;
    }

                        
    /**
     * Set the value of HighSchool
     *
     * @param v new value
     */
    public void setHighSchool(String v) 
    {
    
                  if (!ObjectUtils.equals(this.highSchool, v))
              {
            this.highSchool = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the HighSchoolGrade
     *
     * @return double
     */
    public double getHighSchoolGrade()
    {
        return highSchoolGrade;
    }

                        
    /**
     * Set the value of HighSchoolGrade
     *
     * @param v new value
     */
    public void setHighSchoolGrade(double v) 
    {
    
                  if (this.highSchoolGrade != v)
              {
            this.highSchoolGrade = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the Email
     *
     * @return String
     */
    public String getEmail()
    {
        return email;
    }

                        
    /**
     * Set the value of Email
     *
     * @param v new value
     */
    public void setEmail(String v) 
    {
    
                  if (!ObjectUtils.equals(this.email, v))
              {
            this.email = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the STFAPBracket
     *
     * @return int
     */
    public int getSTFAPBracket()
    {
        return sTFAPBracket;
    }

                        
    /**
     * Set the value of STFAPBracket
     *
     * @param v new value
     */
    public void setSTFAPBracket(int v) 
    {
    
                  if (this.sTFAPBracket != v)
              {
            this.sTFAPBracket = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the Signature
     *
     * @return byte[]
     */
    public byte[] getSignature()
    {
        return signature;
    }

                        
    /**
     * Set the value of Signature
     *
     * @param v new value
     */
    public void setSignature(byte[] v) 
    {
    
                  if (!ObjectUtils.equals(this.signature, v))
              {
            this.signature = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the Adviser
     *
     * @return String
     */
    public String getAdviser()
    {
        return adviser;
    }

                        
    /**
     * Set the value of Adviser
     *
     * @param v new value
     */
    public void setAdviser(String v) 
    {
    
                  if (!ObjectUtils.equals(this.adviser, v))
              {
            this.adviser = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the Citizenship
     *
     * @return int
     */
    public int getCitizenship()
    {
        return citizenship;
    }

                        
    /**
     * Set the value of Citizenship
     *
     * @param v new value
     */
    public void setCitizenship(int v) 
    {
    
                  if (this.citizenship != v)
              {
            this.citizenship = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the Country
     *
     * @return String
     */
    public String getCountry()
    {
        return country;
    }

                        
    /**
     * Set the value of Country
     *
     * @param v new value
     */
    public void setCountry(String v) 
    {
    
                  if (!ObjectUtils.equals(this.country, v))
              {
            this.country = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the CurriculumId
     *
     * @return int
     */
    public int getCurriculumId()
    {
        return curriculumId;
    }

                              
    /**
     * Set the value of CurriculumId
     *
     * @param v new value
     */
    public void setCurriculumId(int v) throws TorqueException
    {
    
                  if (this.curriculumId != v)
              {
            this.curriculumId = v;
            setModified(true);
        }
    
                          
                if (aCurriculum != null && !(aCurriculum.getCurriculumId() == v))
                {
            aCurriculum = null;
        }
      
              }
  
    /**
     * Get the Photo
     *
     * @return byte[]
     */
    public byte[] getPhoto()
    {
        return photo;
    }

                        
    /**
     * Set the value of Photo
     *
     * @param v new value
     */
    public void setPhoto(byte[] v) 
    {
    
                  if (!ObjectUtils.equals(this.photo, v))
              {
            this.photo = v;
            setModified(true);
        }
    
          
              }
  
      
    
                  
    
        private Curriculum aCurriculum;

    /**
     * Declares an association between this object and a Curriculum object
     *
     * @param v Curriculum
     * @throws TorqueException
     */
    public void setCurriculum(Curriculum v) throws TorqueException
    {
            if (v == null)
        {
                    setCurriculumId(0);
                  }
        else
        {
            setCurriculumId(v.getCurriculumId());
        }
                aCurriculum = v;
    }

                                            
    /**
     * Get the associated Curriculum object
     *
     * @return the associated Curriculum object
     * @throws TorqueException
     */
    public Curriculum getCurriculum() throws TorqueException
    {
        if (aCurriculum == null && (this.curriculumId > 0))
        {
                          aCurriculum = CurriculumPeer.retrieveByPK(SimpleKey.keyFor(this.curriculumId));
              
            /* The following can be used instead of the line above to
               guarantee the related object contains a reference
               to this object, but this level of coupling
               may be undesirable in many circumstances.
               As it can lead to a db query with many results that may
               never be used.
               Curriculum obj = CurriculumPeer.retrieveByPK(this.curriculumId);
               obj.addStudents(this);
            */
        }
        return aCurriculum;
    }

    /**
     * Provides convenient way to set a relationship based on a
     * ObjectKey.  e.g.
     * <code>bar.setFooKey(foo.getPrimaryKey())</code>
     *
           */
    public void setCurriculumKey(ObjectKey key) throws TorqueException
    {
      
                        setCurriculumId(((NumberKey) key).intValue());
                  }
       
                                
            
    /**
     * Collection to store aggregation of collStudentClassifications
     */
    protected List collStudentClassifications;

    /**
     * Temporary storage of collStudentClassifications to save a possible db hit in
     * the event objects are add to the collection, but the
     * complete collection is never requested.
     */
    protected void initStudentClassifications()
    {
        if (collStudentClassifications == null)
        {
            collStudentClassifications = new ArrayList();
        }
    }

    /**
     * Method called to associate a StudentClassification object to this object
     * through the StudentClassification foreign key attribute
     *
     * @param l StudentClassification
     * @throws TorqueException
     */
    public void addStudentClassification(StudentClassification l) throws TorqueException
    {
        getStudentClassifications().add(l);
        l.setStudent((Student) this);
    }

    /**
     * The criteria used to select the current contents of collStudentClassifications
     */
    private Criteria lastStudentClassificationsCriteria = null;

    /**
     * If this collection has already been initialized, returns
     * the collection. Otherwise returns the results of
     * getStudentClassifications(new Criteria())
     *
     * @throws TorqueException
     */
    public List getStudentClassifications() throws TorqueException
    {
        if (collStudentClassifications == null)
        {
            collStudentClassifications = getStudentClassifications(new Criteria(10));
        }
        return collStudentClassifications;
    }

    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection.
     * Otherwise if this Student has previously
     * been saved, it will retrieve related StudentClassifications from storage.
     * If this Student is new, it will return
     * an empty collection or the current collection, the criteria
     * is ignored on a new object.
     *
     * @throws TorqueException
     */
    public List getStudentClassifications(Criteria criteria) throws TorqueException
    {
        if (collStudentClassifications == null)
        {
            if (isNew())
            {
               collStudentClassifications = new ArrayList();
            }
            else
            {
                      criteria.add(StudentClassificationPeer.STUDENTID, getStudentId() );
                      collStudentClassifications = StudentClassificationPeer.doSelect(criteria);
            }
        }
        else
        {
            // criteria has no effect for a new object
            if (!isNew())
            {
                // the following code is to determine if a new query is
                // called for.  If the criteria is the same as the last
                // one, just return the collection.
                      criteria.add(StudentClassificationPeer.STUDENTID, getStudentId());
                      if (!lastStudentClassificationsCriteria.equals(criteria))
                {
                    collStudentClassifications = StudentClassificationPeer.doSelect(criteria);
                }
            }
        }
        lastStudentClassificationsCriteria = criteria;

        return collStudentClassifications;
    }

    /**
     * If this collection has already been initialized, returns
     * the collection. Otherwise returns the results of
     * getStudentClassifications(new Criteria(),Connection)
     * This method takes in the Connection also as input so that
     * referenced objects can also be obtained using a Connection
     * that is taken as input
     */
    public List getStudentClassifications(Connection con) throws TorqueException
    {
        if (collStudentClassifications == null)
        {
            collStudentClassifications = getStudentClassifications(new Criteria(10), con);
        }
        return collStudentClassifications;
    }

    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection.
     * Otherwise if this Student has previously
     * been saved, it will retrieve related StudentClassifications from storage.
     * If this Student is new, it will return
     * an empty collection or the current collection, the criteria
     * is ignored on a new object.
     * This method takes in the Connection also as input so that
     * referenced objects can also be obtained using a Connection
     * that is taken as input
     */
    public List getStudentClassifications(Criteria criteria, Connection con)
            throws TorqueException
    {
        if (collStudentClassifications == null)
        {
            if (isNew())
            {
               collStudentClassifications = new ArrayList();
            }
            else
            {
                       criteria.add(StudentClassificationPeer.STUDENTID, getStudentId());
                       collStudentClassifications = StudentClassificationPeer.doSelect(criteria, con);
             }
         }
         else
         {
             // criteria has no effect for a new object
             if (!isNew())
             {
                 // the following code is to determine if a new query is
                 // called for.  If the criteria is the same as the last
                 // one, just return the collection.
                       criteria.add(StudentClassificationPeer.STUDENTID, getStudentId());
                       if (!lastStudentClassificationsCriteria.equals(criteria))
                 {
                     collStudentClassifications = StudentClassificationPeer.doSelect(criteria, con);
                 }
             }
         }
         lastStudentClassificationsCriteria = criteria;

         return collStudentClassifications;
     }

                  
              
                    
                              
                                
                                                              
                                        
                    
                    
          
    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection.
     * Otherwise if this Student is new, it will return
     * an empty collection; or if this Student has previously
     * been saved, it will retrieve related StudentClassifications from storage.
     *
     * This method is protected by default in order to keep the public
     * api reasonable.  You can provide public methods for those you
     * actually need in Student.
     */
    protected List getStudentClassificationsJoinStudent(Criteria criteria)
        throws TorqueException
    {
        if (collStudentClassifications == null)
        {
            if (isNew())
            {
               collStudentClassifications = new ArrayList();
            }
            else
            {
                            criteria.add(StudentClassificationPeer.STUDENTID, getStudentId());
                            collStudentClassifications = StudentClassificationPeer.doSelectJoinStudent(criteria);
            }
        }
        else
        {
            // the following code is to determine if a new query is
            // called for.  If the criteria is the same as the last
            // one, just return the collection.
            boolean newCriteria = true;
                        criteria.add(StudentClassificationPeer.STUDENTID, getStudentId());
                        if (!lastStudentClassificationsCriteria.equals(criteria))
            {
                collStudentClassifications = StudentClassificationPeer.doSelectJoinStudent(criteria);
            }
        }
        lastStudentClassificationsCriteria = criteria;

        return collStudentClassifications;
    }
                            


                          
            
    /**
     * Collection to store aggregation of collStudentStandings
     */
    protected List collStudentStandings;

    /**
     * Temporary storage of collStudentStandings to save a possible db hit in
     * the event objects are add to the collection, but the
     * complete collection is never requested.
     */
    protected void initStudentStandings()
    {
        if (collStudentStandings == null)
        {
            collStudentStandings = new ArrayList();
        }
    }

    /**
     * Method called to associate a StudentStanding object to this object
     * through the StudentStanding foreign key attribute
     *
     * @param l StudentStanding
     * @throws TorqueException
     */
    public void addStudentStanding(StudentStanding l) throws TorqueException
    {
        getStudentStandings().add(l);
        l.setStudent((Student) this);
    }

    /**
     * The criteria used to select the current contents of collStudentStandings
     */
    private Criteria lastStudentStandingsCriteria = null;

    /**
     * If this collection has already been initialized, returns
     * the collection. Otherwise returns the results of
     * getStudentStandings(new Criteria())
     *
     * @throws TorqueException
     */
    public List getStudentStandings() throws TorqueException
    {
        if (collStudentStandings == null)
        {
            collStudentStandings = getStudentStandings(new Criteria(10));
        }
        return collStudentStandings;
    }

    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection.
     * Otherwise if this Student has previously
     * been saved, it will retrieve related StudentStandings from storage.
     * If this Student is new, it will return
     * an empty collection or the current collection, the criteria
     * is ignored on a new object.
     *
     * @throws TorqueException
     */
    public List getStudentStandings(Criteria criteria) throws TorqueException
    {
        if (collStudentStandings == null)
        {
            if (isNew())
            {
               collStudentStandings = new ArrayList();
            }
            else
            {
                      criteria.add(StudentStandingPeer.STUDENTID, getStudentId() );
                      collStudentStandings = StudentStandingPeer.doSelect(criteria);
            }
        }
        else
        {
            // criteria has no effect for a new object
            if (!isNew())
            {
                // the following code is to determine if a new query is
                // called for.  If the criteria is the same as the last
                // one, just return the collection.
                      criteria.add(StudentStandingPeer.STUDENTID, getStudentId());
                      if (!lastStudentStandingsCriteria.equals(criteria))
                {
                    collStudentStandings = StudentStandingPeer.doSelect(criteria);
                }
            }
        }
        lastStudentStandingsCriteria = criteria;

        return collStudentStandings;
    }

    /**
     * If this collection has already been initialized, returns
     * the collection. Otherwise returns the results of
     * getStudentStandings(new Criteria(),Connection)
     * This method takes in the Connection also as input so that
     * referenced objects can also be obtained using a Connection
     * that is taken as input
     */
    public List getStudentStandings(Connection con) throws TorqueException
    {
        if (collStudentStandings == null)
        {
            collStudentStandings = getStudentStandings(new Criteria(10), con);
        }
        return collStudentStandings;
    }

    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection.
     * Otherwise if this Student has previously
     * been saved, it will retrieve related StudentStandings from storage.
     * If this Student is new, it will return
     * an empty collection or the current collection, the criteria
     * is ignored on a new object.
     * This method takes in the Connection also as input so that
     * referenced objects can also be obtained using a Connection
     * that is taken as input
     */
    public List getStudentStandings(Criteria criteria, Connection con)
            throws TorqueException
    {
        if (collStudentStandings == null)
        {
            if (isNew())
            {
               collStudentStandings = new ArrayList();
            }
            else
            {
                       criteria.add(StudentStandingPeer.STUDENTID, getStudentId());
                       collStudentStandings = StudentStandingPeer.doSelect(criteria, con);
             }
         }
         else
         {
             // criteria has no effect for a new object
             if (!isNew())
             {
                 // the following code is to determine if a new query is
                 // called for.  If the criteria is the same as the last
                 // one, just return the collection.
                       criteria.add(StudentStandingPeer.STUDENTID, getStudentId());
                       if (!lastStudentStandingsCriteria.equals(criteria))
                 {
                     collStudentStandings = StudentStandingPeer.doSelect(criteria, con);
                 }
             }
         }
         lastStudentStandingsCriteria = criteria;

         return collStudentStandings;
     }

                  
              
                    
                              
                                
                                                              
                                        
                    
                    
          
    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection.
     * Otherwise if this Student is new, it will return
     * an empty collection; or if this Student has previously
     * been saved, it will retrieve related StudentStandings from storage.
     *
     * This method is protected by default in order to keep the public
     * api reasonable.  You can provide public methods for those you
     * actually need in Student.
     */
    protected List getStudentStandingsJoinStudent(Criteria criteria)
        throws TorqueException
    {
        if (collStudentStandings == null)
        {
            if (isNew())
            {
               collStudentStandings = new ArrayList();
            }
            else
            {
                            criteria.add(StudentStandingPeer.STUDENTID, getStudentId());
                            collStudentStandings = StudentStandingPeer.doSelectJoinStudent(criteria);
            }
        }
        else
        {
            // the following code is to determine if a new query is
            // called for.  If the criteria is the same as the last
            // one, just return the collection.
            boolean newCriteria = true;
                        criteria.add(StudentStandingPeer.STUDENTID, getStudentId());
                        if (!lastStudentStandingsCriteria.equals(criteria))
            {
                collStudentStandings = StudentStandingPeer.doSelectJoinStudent(criteria);
            }
        }
        lastStudentStandingsCriteria = criteria;

        return collStudentStandings;
    }
                            


                          
            
    /**
     * Collection to store aggregation of collStudentAllowedUnitss
     */
    protected List collStudentAllowedUnitss;

    /**
     * Temporary storage of collStudentAllowedUnitss to save a possible db hit in
     * the event objects are add to the collection, but the
     * complete collection is never requested.
     */
    protected void initStudentAllowedUnitss()
    {
        if (collStudentAllowedUnitss == null)
        {
            collStudentAllowedUnitss = new ArrayList();
        }
    }

    /**
     * Method called to associate a StudentAllowedUnits object to this object
     * through the StudentAllowedUnits foreign key attribute
     *
     * @param l StudentAllowedUnits
     * @throws TorqueException
     */
    public void addStudentAllowedUnits(StudentAllowedUnits l) throws TorqueException
    {
        getStudentAllowedUnitss().add(l);
        l.setStudent((Student) this);
    }

    /**
     * The criteria used to select the current contents of collStudentAllowedUnitss
     */
    private Criteria lastStudentAllowedUnitssCriteria = null;

    /**
     * If this collection has already been initialized, returns
     * the collection. Otherwise returns the results of
     * getStudentAllowedUnitss(new Criteria())
     *
     * @throws TorqueException
     */
    public List getStudentAllowedUnitss() throws TorqueException
    {
        if (collStudentAllowedUnitss == null)
        {
            collStudentAllowedUnitss = getStudentAllowedUnitss(new Criteria(10));
        }
        return collStudentAllowedUnitss;
    }

    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection.
     * Otherwise if this Student has previously
     * been saved, it will retrieve related StudentAllowedUnitss from storage.
     * If this Student is new, it will return
     * an empty collection or the current collection, the criteria
     * is ignored on a new object.
     *
     * @throws TorqueException
     */
    public List getStudentAllowedUnitss(Criteria criteria) throws TorqueException
    {
        if (collStudentAllowedUnitss == null)
        {
            if (isNew())
            {
               collStudentAllowedUnitss = new ArrayList();
            }
            else
            {
                      criteria.add(StudentAllowedUnitsPeer.STUDENTID, getStudentId() );
                      collStudentAllowedUnitss = StudentAllowedUnitsPeer.doSelect(criteria);
            }
        }
        else
        {
            // criteria has no effect for a new object
            if (!isNew())
            {
                // the following code is to determine if a new query is
                // called for.  If the criteria is the same as the last
                // one, just return the collection.
                      criteria.add(StudentAllowedUnitsPeer.STUDENTID, getStudentId());
                      if (!lastStudentAllowedUnitssCriteria.equals(criteria))
                {
                    collStudentAllowedUnitss = StudentAllowedUnitsPeer.doSelect(criteria);
                }
            }
        }
        lastStudentAllowedUnitssCriteria = criteria;

        return collStudentAllowedUnitss;
    }

    /**
     * If this collection has already been initialized, returns
     * the collection. Otherwise returns the results of
     * getStudentAllowedUnitss(new Criteria(),Connection)
     * This method takes in the Connection also as input so that
     * referenced objects can also be obtained using a Connection
     * that is taken as input
     */
    public List getStudentAllowedUnitss(Connection con) throws TorqueException
    {
        if (collStudentAllowedUnitss == null)
        {
            collStudentAllowedUnitss = getStudentAllowedUnitss(new Criteria(10), con);
        }
        return collStudentAllowedUnitss;
    }

    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection.
     * Otherwise if this Student has previously
     * been saved, it will retrieve related StudentAllowedUnitss from storage.
     * If this Student is new, it will return
     * an empty collection or the current collection, the criteria
     * is ignored on a new object.
     * This method takes in the Connection also as input so that
     * referenced objects can also be obtained using a Connection
     * that is taken as input
     */
    public List getStudentAllowedUnitss(Criteria criteria, Connection con)
            throws TorqueException
    {
        if (collStudentAllowedUnitss == null)
        {
            if (isNew())
            {
               collStudentAllowedUnitss = new ArrayList();
            }
            else
            {
                       criteria.add(StudentAllowedUnitsPeer.STUDENTID, getStudentId());
                       collStudentAllowedUnitss = StudentAllowedUnitsPeer.doSelect(criteria, con);
             }
         }
         else
         {
             // criteria has no effect for a new object
             if (!isNew())
             {
                 // the following code is to determine if a new query is
                 // called for.  If the criteria is the same as the last
                 // one, just return the collection.
                       criteria.add(StudentAllowedUnitsPeer.STUDENTID, getStudentId());
                       if (!lastStudentAllowedUnitssCriteria.equals(criteria))
                 {
                     collStudentAllowedUnitss = StudentAllowedUnitsPeer.doSelect(criteria, con);
                 }
             }
         }
         lastStudentAllowedUnitssCriteria = criteria;

         return collStudentAllowedUnitss;
     }

                  
              
                    
                              
                                
                                                              
                                        
                    
                    
          
    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection.
     * Otherwise if this Student is new, it will return
     * an empty collection; or if this Student has previously
     * been saved, it will retrieve related StudentAllowedUnitss from storage.
     *
     * This method is protected by default in order to keep the public
     * api reasonable.  You can provide public methods for those you
     * actually need in Student.
     */
    protected List getStudentAllowedUnitssJoinStudent(Criteria criteria)
        throws TorqueException
    {
        if (collStudentAllowedUnitss == null)
        {
            if (isNew())
            {
               collStudentAllowedUnitss = new ArrayList();
            }
            else
            {
                            criteria.add(StudentAllowedUnitsPeer.STUDENTID, getStudentId());
                            collStudentAllowedUnitss = StudentAllowedUnitsPeer.doSelectJoinStudent(criteria);
            }
        }
        else
        {
            // the following code is to determine if a new query is
            // called for.  If the criteria is the same as the last
            // one, just return the collection.
            boolean newCriteria = true;
                        criteria.add(StudentAllowedUnitsPeer.STUDENTID, getStudentId());
                        if (!lastStudentAllowedUnitssCriteria.equals(criteria))
            {
                collStudentAllowedUnitss = StudentAllowedUnitsPeer.doSelectJoinStudent(criteria);
            }
        }
        lastStudentAllowedUnitssCriteria = criteria;

        return collStudentAllowedUnitss;
    }
                            


                          
            
    /**
     * Collection to store aggregation of collStudentCurriculumTotalUnitsEarneds
     */
    protected List collStudentCurriculumTotalUnitsEarneds;

    /**
     * Temporary storage of collStudentCurriculumTotalUnitsEarneds to save a possible db hit in
     * the event objects are add to the collection, but the
     * complete collection is never requested.
     */
    protected void initStudentCurriculumTotalUnitsEarneds()
    {
        if (collStudentCurriculumTotalUnitsEarneds == null)
        {
            collStudentCurriculumTotalUnitsEarneds = new ArrayList();
        }
    }

    /**
     * Method called to associate a StudentCurriculumTotalUnitsEarned object to this object
     * through the StudentCurriculumTotalUnitsEarned foreign key attribute
     *
     * @param l StudentCurriculumTotalUnitsEarned
     * @throws TorqueException
     */
    public void addStudentCurriculumTotalUnitsEarned(StudentCurriculumTotalUnitsEarned l) throws TorqueException
    {
        getStudentCurriculumTotalUnitsEarneds().add(l);
        l.setStudent((Student) this);
    }

    /**
     * The criteria used to select the current contents of collStudentCurriculumTotalUnitsEarneds
     */
    private Criteria lastStudentCurriculumTotalUnitsEarnedsCriteria = null;

    /**
     * If this collection has already been initialized, returns
     * the collection. Otherwise returns the results of
     * getStudentCurriculumTotalUnitsEarneds(new Criteria())
     *
     * @throws TorqueException
     */
    public List getStudentCurriculumTotalUnitsEarneds() throws TorqueException
    {
        if (collStudentCurriculumTotalUnitsEarneds == null)
        {
            collStudentCurriculumTotalUnitsEarneds = getStudentCurriculumTotalUnitsEarneds(new Criteria(10));
        }
        return collStudentCurriculumTotalUnitsEarneds;
    }

    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection.
     * Otherwise if this Student has previously
     * been saved, it will retrieve related StudentCurriculumTotalUnitsEarneds from storage.
     * If this Student is new, it will return
     * an empty collection or the current collection, the criteria
     * is ignored on a new object.
     *
     * @throws TorqueException
     */
    public List getStudentCurriculumTotalUnitsEarneds(Criteria criteria) throws TorqueException
    {
        if (collStudentCurriculumTotalUnitsEarneds == null)
        {
            if (isNew())
            {
               collStudentCurriculumTotalUnitsEarneds = new ArrayList();
            }
            else
            {
                      criteria.add(StudentCurriculumTotalUnitsEarnedPeer.STUDENTID, getStudentId() );
                      collStudentCurriculumTotalUnitsEarneds = StudentCurriculumTotalUnitsEarnedPeer.doSelect(criteria);
            }
        }
        else
        {
            // criteria has no effect for a new object
            if (!isNew())
            {
                // the following code is to determine if a new query is
                // called for.  If the criteria is the same as the last
                // one, just return the collection.
                      criteria.add(StudentCurriculumTotalUnitsEarnedPeer.STUDENTID, getStudentId());
                      if (!lastStudentCurriculumTotalUnitsEarnedsCriteria.equals(criteria))
                {
                    collStudentCurriculumTotalUnitsEarneds = StudentCurriculumTotalUnitsEarnedPeer.doSelect(criteria);
                }
            }
        }
        lastStudentCurriculumTotalUnitsEarnedsCriteria = criteria;

        return collStudentCurriculumTotalUnitsEarneds;
    }

    /**
     * If this collection has already been initialized, returns
     * the collection. Otherwise returns the results of
     * getStudentCurriculumTotalUnitsEarneds(new Criteria(),Connection)
     * This method takes in the Connection also as input so that
     * referenced objects can also be obtained using a Connection
     * that is taken as input
     */
    public List getStudentCurriculumTotalUnitsEarneds(Connection con) throws TorqueException
    {
        if (collStudentCurriculumTotalUnitsEarneds == null)
        {
            collStudentCurriculumTotalUnitsEarneds = getStudentCurriculumTotalUnitsEarneds(new Criteria(10), con);
        }
        return collStudentCurriculumTotalUnitsEarneds;
    }

    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection.
     * Otherwise if this Student has previously
     * been saved, it will retrieve related StudentCurriculumTotalUnitsEarneds from storage.
     * If this Student is new, it will return
     * an empty collection or the current collection, the criteria
     * is ignored on a new object.
     * This method takes in the Connection also as input so that
     * referenced objects can also be obtained using a Connection
     * that is taken as input
     */
    public List getStudentCurriculumTotalUnitsEarneds(Criteria criteria, Connection con)
            throws TorqueException
    {
        if (collStudentCurriculumTotalUnitsEarneds == null)
        {
            if (isNew())
            {
               collStudentCurriculumTotalUnitsEarneds = new ArrayList();
            }
            else
            {
                       criteria.add(StudentCurriculumTotalUnitsEarnedPeer.STUDENTID, getStudentId());
                       collStudentCurriculumTotalUnitsEarneds = StudentCurriculumTotalUnitsEarnedPeer.doSelect(criteria, con);
             }
         }
         else
         {
             // criteria has no effect for a new object
             if (!isNew())
             {
                 // the following code is to determine if a new query is
                 // called for.  If the criteria is the same as the last
                 // one, just return the collection.
                       criteria.add(StudentCurriculumTotalUnitsEarnedPeer.STUDENTID, getStudentId());
                       if (!lastStudentCurriculumTotalUnitsEarnedsCriteria.equals(criteria))
                 {
                     collStudentCurriculumTotalUnitsEarneds = StudentCurriculumTotalUnitsEarnedPeer.doSelect(criteria, con);
                 }
             }
         }
         lastStudentCurriculumTotalUnitsEarnedsCriteria = criteria;

         return collStudentCurriculumTotalUnitsEarneds;
     }

                        
              
                    
                              
                                
                                                              
                                        
                    
                    
          
    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection.
     * Otherwise if this Student is new, it will return
     * an empty collection; or if this Student has previously
     * been saved, it will retrieve related StudentCurriculumTotalUnitsEarneds from storage.
     *
     * This method is protected by default in order to keep the public
     * api reasonable.  You can provide public methods for those you
     * actually need in Student.
     */
    protected List getStudentCurriculumTotalUnitsEarnedsJoinStudent(Criteria criteria)
        throws TorqueException
    {
        if (collStudentCurriculumTotalUnitsEarneds == null)
        {
            if (isNew())
            {
               collStudentCurriculumTotalUnitsEarneds = new ArrayList();
            }
            else
            {
                            criteria.add(StudentCurriculumTotalUnitsEarnedPeer.STUDENTID, getStudentId());
                            collStudentCurriculumTotalUnitsEarneds = StudentCurriculumTotalUnitsEarnedPeer.doSelectJoinStudent(criteria);
            }
        }
        else
        {
            // the following code is to determine if a new query is
            // called for.  If the criteria is the same as the last
            // one, just return the collection.
            boolean newCriteria = true;
                        criteria.add(StudentCurriculumTotalUnitsEarnedPeer.STUDENTID, getStudentId());
                        if (!lastStudentCurriculumTotalUnitsEarnedsCriteria.equals(criteria))
            {
                collStudentCurriculumTotalUnitsEarneds = StudentCurriculumTotalUnitsEarnedPeer.doSelectJoinStudent(criteria);
            }
        }
        lastStudentCurriculumTotalUnitsEarnedsCriteria = criteria;

        return collStudentCurriculumTotalUnitsEarneds;
    }
                  
                    
                    
                                
                                                              
                                        
                    
                    
          
    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection.
     * Otherwise if this Student is new, it will return
     * an empty collection; or if this Student has previously
     * been saved, it will retrieve related StudentCurriculumTotalUnitsEarneds from storage.
     *
     * This method is protected by default in order to keep the public
     * api reasonable.  You can provide public methods for those you
     * actually need in Student.
     */
    protected List getStudentCurriculumTotalUnitsEarnedsJoinCurriculum(Criteria criteria)
        throws TorqueException
    {
        if (collStudentCurriculumTotalUnitsEarneds == null)
        {
            if (isNew())
            {
               collStudentCurriculumTotalUnitsEarneds = new ArrayList();
            }
            else
            {
                            criteria.add(StudentCurriculumTotalUnitsEarnedPeer.STUDENTID, getStudentId());
                            collStudentCurriculumTotalUnitsEarneds = StudentCurriculumTotalUnitsEarnedPeer.doSelectJoinCurriculum(criteria);
            }
        }
        else
        {
            // the following code is to determine if a new query is
            // called for.  If the criteria is the same as the last
            // one, just return the collection.
            boolean newCriteria = true;
                        criteria.add(StudentCurriculumTotalUnitsEarnedPeer.STUDENTID, getStudentId());
                        if (!lastStudentCurriculumTotalUnitsEarnedsCriteria.equals(criteria))
            {
                collStudentCurriculumTotalUnitsEarneds = StudentCurriculumTotalUnitsEarnedPeer.doSelectJoinCurriculum(criteria);
            }
        }
        lastStudentCurriculumTotalUnitsEarnedsCriteria = criteria;

        return collStudentCurriculumTotalUnitsEarneds;
    }
                            


                          
            
    /**
     * Collection to store aggregation of collStudentPrioritys
     */
    protected List collStudentPrioritys;

    /**
     * Temporary storage of collStudentPrioritys to save a possible db hit in
     * the event objects are add to the collection, but the
     * complete collection is never requested.
     */
    protected void initStudentPrioritys()
    {
        if (collStudentPrioritys == null)
        {
            collStudentPrioritys = new ArrayList();
        }
    }

    /**
     * Method called to associate a StudentPriority object to this object
     * through the StudentPriority foreign key attribute
     *
     * @param l StudentPriority
     * @throws TorqueException
     */
    public void addStudentPriority(StudentPriority l) throws TorqueException
    {
        getStudentPrioritys().add(l);
        l.setStudent((Student) this);
    }

    /**
     * The criteria used to select the current contents of collStudentPrioritys
     */
    private Criteria lastStudentPrioritysCriteria = null;

    /**
     * If this collection has already been initialized, returns
     * the collection. Otherwise returns the results of
     * getStudentPrioritys(new Criteria())
     *
     * @throws TorqueException
     */
    public List getStudentPrioritys() throws TorqueException
    {
        if (collStudentPrioritys == null)
        {
            collStudentPrioritys = getStudentPrioritys(new Criteria(10));
        }
        return collStudentPrioritys;
    }

    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection.
     * Otherwise if this Student has previously
     * been saved, it will retrieve related StudentPrioritys from storage.
     * If this Student is new, it will return
     * an empty collection or the current collection, the criteria
     * is ignored on a new object.
     *
     * @throws TorqueException
     */
    public List getStudentPrioritys(Criteria criteria) throws TorqueException
    {
        if (collStudentPrioritys == null)
        {
            if (isNew())
            {
               collStudentPrioritys = new ArrayList();
            }
            else
            {
                      criteria.add(StudentPriorityPeer.STUDENTID, getStudentId() );
                      collStudentPrioritys = StudentPriorityPeer.doSelect(criteria);
            }
        }
        else
        {
            // criteria has no effect for a new object
            if (!isNew())
            {
                // the following code is to determine if a new query is
                // called for.  If the criteria is the same as the last
                // one, just return the collection.
                      criteria.add(StudentPriorityPeer.STUDENTID, getStudentId());
                      if (!lastStudentPrioritysCriteria.equals(criteria))
                {
                    collStudentPrioritys = StudentPriorityPeer.doSelect(criteria);
                }
            }
        }
        lastStudentPrioritysCriteria = criteria;

        return collStudentPrioritys;
    }

    /**
     * If this collection has already been initialized, returns
     * the collection. Otherwise returns the results of
     * getStudentPrioritys(new Criteria(),Connection)
     * This method takes in the Connection also as input so that
     * referenced objects can also be obtained using a Connection
     * that is taken as input
     */
    public List getStudentPrioritys(Connection con) throws TorqueException
    {
        if (collStudentPrioritys == null)
        {
            collStudentPrioritys = getStudentPrioritys(new Criteria(10), con);
        }
        return collStudentPrioritys;
    }

    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection.
     * Otherwise if this Student has previously
     * been saved, it will retrieve related StudentPrioritys from storage.
     * If this Student is new, it will return
     * an empty collection or the current collection, the criteria
     * is ignored on a new object.
     * This method takes in the Connection also as input so that
     * referenced objects can also be obtained using a Connection
     * that is taken as input
     */
    public List getStudentPrioritys(Criteria criteria, Connection con)
            throws TorqueException
    {
        if (collStudentPrioritys == null)
        {
            if (isNew())
            {
               collStudentPrioritys = new ArrayList();
            }
            else
            {
                       criteria.add(StudentPriorityPeer.STUDENTID, getStudentId());
                       collStudentPrioritys = StudentPriorityPeer.doSelect(criteria, con);
             }
         }
         else
         {
             // criteria has no effect for a new object
             if (!isNew())
             {
                 // the following code is to determine if a new query is
                 // called for.  If the criteria is the same as the last
                 // one, just return the collection.
                       criteria.add(StudentPriorityPeer.STUDENTID, getStudentId());
                       if (!lastStudentPrioritysCriteria.equals(criteria))
                 {
                     collStudentPrioritys = StudentPriorityPeer.doSelect(criteria, con);
                 }
             }
         }
         lastStudentPrioritysCriteria = criteria;

         return collStudentPrioritys;
     }

                  
              
                    
                              
                                
                                                              
                                        
                    
                    
          
    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection.
     * Otherwise if this Student is new, it will return
     * an empty collection; or if this Student has previously
     * been saved, it will retrieve related StudentPrioritys from storage.
     *
     * This method is protected by default in order to keep the public
     * api reasonable.  You can provide public methods for those you
     * actually need in Student.
     */
    protected List getStudentPrioritysJoinStudent(Criteria criteria)
        throws TorqueException
    {
        if (collStudentPrioritys == null)
        {
            if (isNew())
            {
               collStudentPrioritys = new ArrayList();
            }
            else
            {
                            criteria.add(StudentPriorityPeer.STUDENTID, getStudentId());
                            collStudentPrioritys = StudentPriorityPeer.doSelectJoinStudent(criteria);
            }
        }
        else
        {
            // the following code is to determine if a new query is
            // called for.  If the criteria is the same as the last
            // one, just return the collection.
            boolean newCriteria = true;
                        criteria.add(StudentPriorityPeer.STUDENTID, getStudentId());
                        if (!lastStudentPrioritysCriteria.equals(criteria))
            {
                collStudentPrioritys = StudentPriorityPeer.doSelectJoinStudent(criteria);
            }
        }
        lastStudentPrioritysCriteria = criteria;

        return collStudentPrioritys;
    }
                            


                          
            
    /**
     * Collection to store aggregation of collPlanOfCourseWorks
     */
    protected List collPlanOfCourseWorks;

    /**
     * Temporary storage of collPlanOfCourseWorks to save a possible db hit in
     * the event objects are add to the collection, but the
     * complete collection is never requested.
     */
    protected void initPlanOfCourseWorks()
    {
        if (collPlanOfCourseWorks == null)
        {
            collPlanOfCourseWorks = new ArrayList();
        }
    }

    /**
     * Method called to associate a PlanOfCourseWork object to this object
     * through the PlanOfCourseWork foreign key attribute
     *
     * @param l PlanOfCourseWork
     * @throws TorqueException
     */
    public void addPlanOfCourseWork(PlanOfCourseWork l) throws TorqueException
    {
        getPlanOfCourseWorks().add(l);
        l.setStudent((Student) this);
    }

    /**
     * The criteria used to select the current contents of collPlanOfCourseWorks
     */
    private Criteria lastPlanOfCourseWorksCriteria = null;

    /**
     * If this collection has already been initialized, returns
     * the collection. Otherwise returns the results of
     * getPlanOfCourseWorks(new Criteria())
     *
     * @throws TorqueException
     */
    public List getPlanOfCourseWorks() throws TorqueException
    {
        if (collPlanOfCourseWorks == null)
        {
            collPlanOfCourseWorks = getPlanOfCourseWorks(new Criteria(10));
        }
        return collPlanOfCourseWorks;
    }

    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection.
     * Otherwise if this Student has previously
     * been saved, it will retrieve related PlanOfCourseWorks from storage.
     * If this Student is new, it will return
     * an empty collection or the current collection, the criteria
     * is ignored on a new object.
     *
     * @throws TorqueException
     */
    public List getPlanOfCourseWorks(Criteria criteria) throws TorqueException
    {
        if (collPlanOfCourseWorks == null)
        {
            if (isNew())
            {
               collPlanOfCourseWorks = new ArrayList();
            }
            else
            {
                      criteria.add(PlanOfCourseWorkPeer.STUDENTID, getStudentId() );
                      collPlanOfCourseWorks = PlanOfCourseWorkPeer.doSelect(criteria);
            }
        }
        else
        {
            // criteria has no effect for a new object
            if (!isNew())
            {
                // the following code is to determine if a new query is
                // called for.  If the criteria is the same as the last
                // one, just return the collection.
                      criteria.add(PlanOfCourseWorkPeer.STUDENTID, getStudentId());
                      if (!lastPlanOfCourseWorksCriteria.equals(criteria))
                {
                    collPlanOfCourseWorks = PlanOfCourseWorkPeer.doSelect(criteria);
                }
            }
        }
        lastPlanOfCourseWorksCriteria = criteria;

        return collPlanOfCourseWorks;
    }

    /**
     * If this collection has already been initialized, returns
     * the collection. Otherwise returns the results of
     * getPlanOfCourseWorks(new Criteria(),Connection)
     * This method takes in the Connection also as input so that
     * referenced objects can also be obtained using a Connection
     * that is taken as input
     */
    public List getPlanOfCourseWorks(Connection con) throws TorqueException
    {
        if (collPlanOfCourseWorks == null)
        {
            collPlanOfCourseWorks = getPlanOfCourseWorks(new Criteria(10), con);
        }
        return collPlanOfCourseWorks;
    }

    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection.
     * Otherwise if this Student has previously
     * been saved, it will retrieve related PlanOfCourseWorks from storage.
     * If this Student is new, it will return
     * an empty collection or the current collection, the criteria
     * is ignored on a new object.
     * This method takes in the Connection also as input so that
     * referenced objects can also be obtained using a Connection
     * that is taken as input
     */
    public List getPlanOfCourseWorks(Criteria criteria, Connection con)
            throws TorqueException
    {
        if (collPlanOfCourseWorks == null)
        {
            if (isNew())
            {
               collPlanOfCourseWorks = new ArrayList();
            }
            else
            {
                       criteria.add(PlanOfCourseWorkPeer.STUDENTID, getStudentId());
                       collPlanOfCourseWorks = PlanOfCourseWorkPeer.doSelect(criteria, con);
             }
         }
         else
         {
             // criteria has no effect for a new object
             if (!isNew())
             {
                 // the following code is to determine if a new query is
                 // called for.  If the criteria is the same as the last
                 // one, just return the collection.
                       criteria.add(PlanOfCourseWorkPeer.STUDENTID, getStudentId());
                       if (!lastPlanOfCourseWorksCriteria.equals(criteria))
                 {
                     collPlanOfCourseWorks = PlanOfCourseWorkPeer.doSelect(criteria, con);
                 }
             }
         }
         lastPlanOfCourseWorksCriteria = criteria;

         return collPlanOfCourseWorks;
     }

                        
              
                    
                              
                                
                                                              
                                        
                    
                    
          
    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection.
     * Otherwise if this Student is new, it will return
     * an empty collection; or if this Student has previously
     * been saved, it will retrieve related PlanOfCourseWorks from storage.
     *
     * This method is protected by default in order to keep the public
     * api reasonable.  You can provide public methods for those you
     * actually need in Student.
     */
    protected List getPlanOfCourseWorksJoinStudent(Criteria criteria)
        throws TorqueException
    {
        if (collPlanOfCourseWorks == null)
        {
            if (isNew())
            {
               collPlanOfCourseWorks = new ArrayList();
            }
            else
            {
                            criteria.add(PlanOfCourseWorkPeer.STUDENTID, getStudentId());
                            collPlanOfCourseWorks = PlanOfCourseWorkPeer.doSelectJoinStudent(criteria);
            }
        }
        else
        {
            // the following code is to determine if a new query is
            // called for.  If the criteria is the same as the last
            // one, just return the collection.
            boolean newCriteria = true;
                        criteria.add(PlanOfCourseWorkPeer.STUDENTID, getStudentId());
                        if (!lastPlanOfCourseWorksCriteria.equals(criteria))
            {
                collPlanOfCourseWorks = PlanOfCourseWorkPeer.doSelectJoinStudent(criteria);
            }
        }
        lastPlanOfCourseWorksCriteria = criteria;

        return collPlanOfCourseWorks;
    }
                  
                    
                    
                                
                                                              
                                        
                    
                    
          
    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection.
     * Otherwise if this Student is new, it will return
     * an empty collection; or if this Student has previously
     * been saved, it will retrieve related PlanOfCourseWorks from storage.
     *
     * This method is protected by default in order to keep the public
     * api reasonable.  You can provide public methods for those you
     * actually need in Student.
     */
    protected List getPlanOfCourseWorksJoinCourse(Criteria criteria)
        throws TorqueException
    {
        if (collPlanOfCourseWorks == null)
        {
            if (isNew())
            {
               collPlanOfCourseWorks = new ArrayList();
            }
            else
            {
                            criteria.add(PlanOfCourseWorkPeer.STUDENTID, getStudentId());
                            collPlanOfCourseWorks = PlanOfCourseWorkPeer.doSelectJoinCourse(criteria);
            }
        }
        else
        {
            // the following code is to determine if a new query is
            // called for.  If the criteria is the same as the last
            // one, just return the collection.
            boolean newCriteria = true;
                        criteria.add(PlanOfCourseWorkPeer.STUDENTID, getStudentId());
                        if (!lastPlanOfCourseWorksCriteria.equals(criteria))
            {
                collPlanOfCourseWorks = PlanOfCourseWorkPeer.doSelectJoinCourse(criteria);
            }
        }
        lastPlanOfCourseWorksCriteria = criteria;

        return collPlanOfCourseWorks;
    }
                            


                          
            
    /**
     * Collection to store aggregation of collGrades
     */
    protected List collGrades;

    /**
     * Temporary storage of collGrades to save a possible db hit in
     * the event objects are add to the collection, but the
     * complete collection is never requested.
     */
    protected void initGrades()
    {
        if (collGrades == null)
        {
            collGrades = new ArrayList();
        }
    }

    /**
     * Method called to associate a Grade object to this object
     * through the Grade foreign key attribute
     *
     * @param l Grade
     * @throws TorqueException
     */
    public void addGrade(Grade l) throws TorqueException
    {
        getGrades().add(l);
        l.setStudent((Student) this);
    }

    /**
     * The criteria used to select the current contents of collGrades
     */
    private Criteria lastGradesCriteria = null;

    /**
     * If this collection has already been initialized, returns
     * the collection. Otherwise returns the results of
     * getGrades(new Criteria())
     *
     * @throws TorqueException
     */
    public List getGrades() throws TorqueException
    {
        if (collGrades == null)
        {
            collGrades = getGrades(new Criteria(10));
        }
        return collGrades;
    }

    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection.
     * Otherwise if this Student has previously
     * been saved, it will retrieve related Grades from storage.
     * If this Student is new, it will return
     * an empty collection or the current collection, the criteria
     * is ignored on a new object.
     *
     * @throws TorqueException
     */
    public List getGrades(Criteria criteria) throws TorqueException
    {
        if (collGrades == null)
        {
            if (isNew())
            {
               collGrades = new ArrayList();
            }
            else
            {
                      criteria.add(GradePeer.STUDENTID, getStudentId() );
                      collGrades = GradePeer.doSelect(criteria);
            }
        }
        else
        {
            // criteria has no effect for a new object
            if (!isNew())
            {
                // the following code is to determine if a new query is
                // called for.  If the criteria is the same as the last
                // one, just return the collection.
                      criteria.add(GradePeer.STUDENTID, getStudentId());
                      if (!lastGradesCriteria.equals(criteria))
                {
                    collGrades = GradePeer.doSelect(criteria);
                }
            }
        }
        lastGradesCriteria = criteria;

        return collGrades;
    }

    /**
     * If this collection has already been initialized, returns
     * the collection. Otherwise returns the results of
     * getGrades(new Criteria(),Connection)
     * This method takes in the Connection also as input so that
     * referenced objects can also be obtained using a Connection
     * that is taken as input
     */
    public List getGrades(Connection con) throws TorqueException
    {
        if (collGrades == null)
        {
            collGrades = getGrades(new Criteria(10), con);
        }
        return collGrades;
    }

    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection.
     * Otherwise if this Student has previously
     * been saved, it will retrieve related Grades from storage.
     * If this Student is new, it will return
     * an empty collection or the current collection, the criteria
     * is ignored on a new object.
     * This method takes in the Connection also as input so that
     * referenced objects can also be obtained using a Connection
     * that is taken as input
     */
    public List getGrades(Criteria criteria, Connection con)
            throws TorqueException
    {
        if (collGrades == null)
        {
            if (isNew())
            {
               collGrades = new ArrayList();
            }
            else
            {
                       criteria.add(GradePeer.STUDENTID, getStudentId());
                       collGrades = GradePeer.doSelect(criteria, con);
             }
         }
         else
         {
             // criteria has no effect for a new object
             if (!isNew())
             {
                 // the following code is to determine if a new query is
                 // called for.  If the criteria is the same as the last
                 // one, just return the collection.
                       criteria.add(GradePeer.STUDENTID, getStudentId());
                       if (!lastGradesCriteria.equals(criteria))
                 {
                     collGrades = GradePeer.doSelect(criteria, con);
                 }
             }
         }
         lastGradesCriteria = criteria;

         return collGrades;
     }

                        
              
                    
                    
                                
                                                              
                                        
                    
                    
          
    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection.
     * Otherwise if this Student is new, it will return
     * an empty collection; or if this Student has previously
     * been saved, it will retrieve related Grades from storage.
     *
     * This method is protected by default in order to keep the public
     * api reasonable.  You can provide public methods for those you
     * actually need in Student.
     */
    protected List getGradesJoinCourse(Criteria criteria)
        throws TorqueException
    {
        if (collGrades == null)
        {
            if (isNew())
            {
               collGrades = new ArrayList();
            }
            else
            {
                            criteria.add(GradePeer.STUDENTID, getStudentId());
                            collGrades = GradePeer.doSelectJoinCourse(criteria);
            }
        }
        else
        {
            // the following code is to determine if a new query is
            // called for.  If the criteria is the same as the last
            // one, just return the collection.
            boolean newCriteria = true;
                        criteria.add(GradePeer.STUDENTID, getStudentId());
                        if (!lastGradesCriteria.equals(criteria))
            {
                collGrades = GradePeer.doSelectJoinCourse(criteria);
            }
        }
        lastGradesCriteria = criteria;

        return collGrades;
    }
                  
                    
                              
                                
                                                              
                                        
                    
                    
          
    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection.
     * Otherwise if this Student is new, it will return
     * an empty collection; or if this Student has previously
     * been saved, it will retrieve related Grades from storage.
     *
     * This method is protected by default in order to keep the public
     * api reasonable.  You can provide public methods for those you
     * actually need in Student.
     */
    protected List getGradesJoinStudent(Criteria criteria)
        throws TorqueException
    {
        if (collGrades == null)
        {
            if (isNew())
            {
               collGrades = new ArrayList();
            }
            else
            {
                            criteria.add(GradePeer.STUDENTID, getStudentId());
                            collGrades = GradePeer.doSelectJoinStudent(criteria);
            }
        }
        else
        {
            // the following code is to determine if a new query is
            // called for.  If the criteria is the same as the last
            // one, just return the collection.
            boolean newCriteria = true;
                        criteria.add(GradePeer.STUDENTID, getStudentId());
                        if (!lastGradesCriteria.equals(criteria))
            {
                collGrades = GradePeer.doSelectJoinStudent(criteria);
            }
        }
        lastGradesCriteria = criteria;

        return collGrades;
    }
                            


                          
            
    /**
     * Collection to store aggregation of collRecommendedCourses
     */
    protected List collRecommendedCourses;

    /**
     * Temporary storage of collRecommendedCourses to save a possible db hit in
     * the event objects are add to the collection, but the
     * complete collection is never requested.
     */
    protected void initRecommendedCourses()
    {
        if (collRecommendedCourses == null)
        {
            collRecommendedCourses = new ArrayList();
        }
    }

    /**
     * Method called to associate a RecommendedCourse object to this object
     * through the RecommendedCourse foreign key attribute
     *
     * @param l RecommendedCourse
     * @throws TorqueException
     */
    public void addRecommendedCourse(RecommendedCourse l) throws TorqueException
    {
        getRecommendedCourses().add(l);
        l.setStudent((Student) this);
    }

    /**
     * The criteria used to select the current contents of collRecommendedCourses
     */
    private Criteria lastRecommendedCoursesCriteria = null;

    /**
     * If this collection has already been initialized, returns
     * the collection. Otherwise returns the results of
     * getRecommendedCourses(new Criteria())
     *
     * @throws TorqueException
     */
    public List getRecommendedCourses() throws TorqueException
    {
        if (collRecommendedCourses == null)
        {
            collRecommendedCourses = getRecommendedCourses(new Criteria(10));
        }
        return collRecommendedCourses;
    }

    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection.
     * Otherwise if this Student has previously
     * been saved, it will retrieve related RecommendedCourses from storage.
     * If this Student is new, it will return
     * an empty collection or the current collection, the criteria
     * is ignored on a new object.
     *
     * @throws TorqueException
     */
    public List getRecommendedCourses(Criteria criteria) throws TorqueException
    {
        if (collRecommendedCourses == null)
        {
            if (isNew())
            {
               collRecommendedCourses = new ArrayList();
            }
            else
            {
                      criteria.add(RecommendedCoursePeer.STUDENTID, getStudentId() );
                      collRecommendedCourses = RecommendedCoursePeer.doSelect(criteria);
            }
        }
        else
        {
            // criteria has no effect for a new object
            if (!isNew())
            {
                // the following code is to determine if a new query is
                // called for.  If the criteria is the same as the last
                // one, just return the collection.
                      criteria.add(RecommendedCoursePeer.STUDENTID, getStudentId());
                      if (!lastRecommendedCoursesCriteria.equals(criteria))
                {
                    collRecommendedCourses = RecommendedCoursePeer.doSelect(criteria);
                }
            }
        }
        lastRecommendedCoursesCriteria = criteria;

        return collRecommendedCourses;
    }

    /**
     * If this collection has already been initialized, returns
     * the collection. Otherwise returns the results of
     * getRecommendedCourses(new Criteria(),Connection)
     * This method takes in the Connection also as input so that
     * referenced objects can also be obtained using a Connection
     * that is taken as input
     */
    public List getRecommendedCourses(Connection con) throws TorqueException
    {
        if (collRecommendedCourses == null)
        {
            collRecommendedCourses = getRecommendedCourses(new Criteria(10), con);
        }
        return collRecommendedCourses;
    }

    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection.
     * Otherwise if this Student has previously
     * been saved, it will retrieve related RecommendedCourses from storage.
     * If this Student is new, it will return
     * an empty collection or the current collection, the criteria
     * is ignored on a new object.
     * This method takes in the Connection also as input so that
     * referenced objects can also be obtained using a Connection
     * that is taken as input
     */
    public List getRecommendedCourses(Criteria criteria, Connection con)
            throws TorqueException
    {
        if (collRecommendedCourses == null)
        {
            if (isNew())
            {
               collRecommendedCourses = new ArrayList();
            }
            else
            {
                       criteria.add(RecommendedCoursePeer.STUDENTID, getStudentId());
                       collRecommendedCourses = RecommendedCoursePeer.doSelect(criteria, con);
             }
         }
         else
         {
             // criteria has no effect for a new object
             if (!isNew())
             {
                 // the following code is to determine if a new query is
                 // called for.  If the criteria is the same as the last
                 // one, just return the collection.
                       criteria.add(RecommendedCoursePeer.STUDENTID, getStudentId());
                       if (!lastRecommendedCoursesCriteria.equals(criteria))
                 {
                     collRecommendedCourses = RecommendedCoursePeer.doSelect(criteria, con);
                 }
             }
         }
         lastRecommendedCoursesCriteria = criteria;

         return collRecommendedCourses;
     }

                        
              
                    
                              
                                
                                                              
                                        
                    
                    
          
    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection.
     * Otherwise if this Student is new, it will return
     * an empty collection; or if this Student has previously
     * been saved, it will retrieve related RecommendedCourses from storage.
     *
     * This method is protected by default in order to keep the public
     * api reasonable.  You can provide public methods for those you
     * actually need in Student.
     */
    protected List getRecommendedCoursesJoinStudent(Criteria criteria)
        throws TorqueException
    {
        if (collRecommendedCourses == null)
        {
            if (isNew())
            {
               collRecommendedCourses = new ArrayList();
            }
            else
            {
                            criteria.add(RecommendedCoursePeer.STUDENTID, getStudentId());
                            collRecommendedCourses = RecommendedCoursePeer.doSelectJoinStudent(criteria);
            }
        }
        else
        {
            // the following code is to determine if a new query is
            // called for.  If the criteria is the same as the last
            // one, just return the collection.
            boolean newCriteria = true;
                        criteria.add(RecommendedCoursePeer.STUDENTID, getStudentId());
                        if (!lastRecommendedCoursesCriteria.equals(criteria))
            {
                collRecommendedCourses = RecommendedCoursePeer.doSelectJoinStudent(criteria);
            }
        }
        lastRecommendedCoursesCriteria = criteria;

        return collRecommendedCourses;
    }
                  
                    
                    
                                
                                                              
                                        
                    
                    
          
    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection.
     * Otherwise if this Student is new, it will return
     * an empty collection; or if this Student has previously
     * been saved, it will retrieve related RecommendedCourses from storage.
     *
     * This method is protected by default in order to keep the public
     * api reasonable.  You can provide public methods for those you
     * actually need in Student.
     */
    protected List getRecommendedCoursesJoinCourse(Criteria criteria)
        throws TorqueException
    {
        if (collRecommendedCourses == null)
        {
            if (isNew())
            {
               collRecommendedCourses = new ArrayList();
            }
            else
            {
                            criteria.add(RecommendedCoursePeer.STUDENTID, getStudentId());
                            collRecommendedCourses = RecommendedCoursePeer.doSelectJoinCourse(criteria);
            }
        }
        else
        {
            // the following code is to determine if a new query is
            // called for.  If the criteria is the same as the last
            // one, just return the collection.
            boolean newCriteria = true;
                        criteria.add(RecommendedCoursePeer.STUDENTID, getStudentId());
                        if (!lastRecommendedCoursesCriteria.equals(criteria))
            {
                collRecommendedCourses = RecommendedCoursePeer.doSelectJoinCourse(criteria);
            }
        }
        lastRecommendedCoursesCriteria = criteria;

        return collRecommendedCourses;
    }
                            


                          
            
    /**
     * Collection to store aggregation of collSlots
     */
    protected List collSlots;

    /**
     * Temporary storage of collSlots to save a possible db hit in
     * the event objects are add to the collection, but the
     * complete collection is never requested.
     */
    protected void initSlots()
    {
        if (collSlots == null)
        {
            collSlots = new ArrayList();
        }
    }

    /**
     * Method called to associate a Slot object to this object
     * through the Slot foreign key attribute
     *
     * @param l Slot
     * @throws TorqueException
     */
    public void addSlot(Slot l) throws TorqueException
    {
        getSlots().add(l);
        l.setStudent((Student) this);
    }

    /**
     * The criteria used to select the current contents of collSlots
     */
    private Criteria lastSlotsCriteria = null;

    /**
     * If this collection has already been initialized, returns
     * the collection. Otherwise returns the results of
     * getSlots(new Criteria())
     *
     * @throws TorqueException
     */
    public List getSlots() throws TorqueException
    {
        if (collSlots == null)
        {
            collSlots = getSlots(new Criteria(10));
        }
        return collSlots;
    }

    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection.
     * Otherwise if this Student has previously
     * been saved, it will retrieve related Slots from storage.
     * If this Student is new, it will return
     * an empty collection or the current collection, the criteria
     * is ignored on a new object.
     *
     * @throws TorqueException
     */
    public List getSlots(Criteria criteria) throws TorqueException
    {
        if (collSlots == null)
        {
            if (isNew())
            {
               collSlots = new ArrayList();
            }
            else
            {
                      criteria.add(SlotPeer.STUDENTID, getStudentId() );
                      collSlots = SlotPeer.doSelect(criteria);
            }
        }
        else
        {
            // criteria has no effect for a new object
            if (!isNew())
            {
                // the following code is to determine if a new query is
                // called for.  If the criteria is the same as the last
                // one, just return the collection.
                      criteria.add(SlotPeer.STUDENTID, getStudentId());
                      if (!lastSlotsCriteria.equals(criteria))
                {
                    collSlots = SlotPeer.doSelect(criteria);
                }
            }
        }
        lastSlotsCriteria = criteria;

        return collSlots;
    }

    /**
     * If this collection has already been initialized, returns
     * the collection. Otherwise returns the results of
     * getSlots(new Criteria(),Connection)
     * This method takes in the Connection also as input so that
     * referenced objects can also be obtained using a Connection
     * that is taken as input
     */
    public List getSlots(Connection con) throws TorqueException
    {
        if (collSlots == null)
        {
            collSlots = getSlots(new Criteria(10), con);
        }
        return collSlots;
    }

    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection.
     * Otherwise if this Student has previously
     * been saved, it will retrieve related Slots from storage.
     * If this Student is new, it will return
     * an empty collection or the current collection, the criteria
     * is ignored on a new object.
     * This method takes in the Connection also as input so that
     * referenced objects can also be obtained using a Connection
     * that is taken as input
     */
    public List getSlots(Criteria criteria, Connection con)
            throws TorqueException
    {
        if (collSlots == null)
        {
            if (isNew())
            {
               collSlots = new ArrayList();
            }
            else
            {
                       criteria.add(SlotPeer.STUDENTID, getStudentId());
                       collSlots = SlotPeer.doSelect(criteria, con);
             }
         }
         else
         {
             // criteria has no effect for a new object
             if (!isNew())
             {
                 // the following code is to determine if a new query is
                 // called for.  If the criteria is the same as the last
                 // one, just return the collection.
                       criteria.add(SlotPeer.STUDENTID, getStudentId());
                       if (!lastSlotsCriteria.equals(criteria))
                 {
                     collSlots = SlotPeer.doSelect(criteria, con);
                 }
             }
         }
         lastSlotsCriteria = criteria;

         return collSlots;
     }

                        
              
                    
                              
                                
                                                              
                                        
                    
                    
          
    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection.
     * Otherwise if this Student is new, it will return
     * an empty collection; or if this Student has previously
     * been saved, it will retrieve related Slots from storage.
     *
     * This method is protected by default in order to keep the public
     * api reasonable.  You can provide public methods for those you
     * actually need in Student.
     */
    protected List getSlotsJoinStudent(Criteria criteria)
        throws TorqueException
    {
        if (collSlots == null)
        {
            if (isNew())
            {
               collSlots = new ArrayList();
            }
            else
            {
                            criteria.add(SlotPeer.STUDENTID, getStudentId());
                            collSlots = SlotPeer.doSelectJoinStudent(criteria);
            }
        }
        else
        {
            // the following code is to determine if a new query is
            // called for.  If the criteria is the same as the last
            // one, just return the collection.
            boolean newCriteria = true;
                        criteria.add(SlotPeer.STUDENTID, getStudentId());
                        if (!lastSlotsCriteria.equals(criteria))
            {
                collSlots = SlotPeer.doSelectJoinStudent(criteria);
            }
        }
        lastSlotsCriteria = criteria;

        return collSlots;
    }
                  
                    
                    
                                
                                                              
                                        
                    
                    
          
    /**
     * If this collection has already been initialized with
     * an identical criteria, it returns the collection.
     * Otherwise if this Student is new, it will return
     * an empty collection; or if this Student has previously
     * been saved, it will retrieve related Slots from storage.
     *
     * This method is protected by default in order to keep the public
     * api reasonable.  You can provide public methods for those you
     * actually need in Student.
     */
    protected List getSlotsJoinCourseOffering(Criteria criteria)
        throws TorqueException
    {
        if (collSlots == null)
        {
            if (isNew())
            {
               collSlots = new ArrayList();
            }
            else
            {
                            criteria.add(SlotPeer.STUDENTID, getStudentId());
                            collSlots = SlotPeer.doSelectJoinCourseOffering(criteria);
            }
        }
        else
        {
            // the following code is to determine if a new query is
            // called for.  If the criteria is the same as the last
            // one, just return the collection.
            boolean newCriteria = true;
                        criteria.add(SlotPeer.STUDENTID, getStudentId());
                        if (!lastSlotsCriteria.equals(criteria))
            {
                collSlots = SlotPeer.doSelectJoinCourseOffering(criteria);
            }
        }
        lastSlotsCriteria = criteria;

        return collSlots;
    }
                            


          
    private static List fieldNames = null;

    /**
     * Generate a list of field names.
     *
     * @return a list of field names
     */
    public static synchronized List getFieldNames()
    {
        if (fieldNames == null)
        {
            fieldNames = new ArrayList();
              fieldNames.add("StudentId");
              fieldNames.add("StudentNumber");
              fieldNames.add("FirstName");
              fieldNames.add("MiddleName");
              fieldNames.add("LastName");
              fieldNames.add("Sex");
              fieldNames.add("BirthDate");
              fieldNames.add("CivilStatus");
              fieldNames.add("ResidentialAddress");
              fieldNames.add("CollegeAddress");
              fieldNames.add("Father");
              fieldNames.add("Mother");
              fieldNames.add("Guardian");
              fieldNames.add("GuardianContactNumber");
              fieldNames.add("GuardianAddress");
              fieldNames.add("GuardianRelation");
              fieldNames.add("GuardianEmail");
              fieldNames.add("IsRGEP");
              fieldNames.add("Zipcode");
              fieldNames.add("TelephoneNumber");
              fieldNames.add("CellphoneNumber");
              fieldNames.add("HighSchool");
              fieldNames.add("HighSchoolGrade");
              fieldNames.add("Email");
              fieldNames.add("STFAPBracket");
              fieldNames.add("Signature");
              fieldNames.add("Adviser");
              fieldNames.add("Citizenship");
              fieldNames.add("Country");
              fieldNames.add("CurriculumId");
              fieldNames.add("Photo");
              fieldNames = Collections.unmodifiableList(fieldNames);
        }
        return fieldNames;
    }

    /**
     * Retrieves a field from the object by name passed in as a String.
     *
     * @param name field name
     * @return value
     */
    public Object getByName(String name)
    {
          if (name.equals("StudentId"))
        {
                return new Integer(getStudentId());
            }
          if (name.equals("StudentNumber"))
        {
                return getStudentNumber();
            }
          if (name.equals("FirstName"))
        {
                return getFirstName();
            }
          if (name.equals("MiddleName"))
        {
                return getMiddleName();
            }
          if (name.equals("LastName"))
        {
                return getLastName();
            }
          if (name.equals("Sex"))
        {
                return getSex();
            }
          if (name.equals("BirthDate"))
        {
                return getBirthDate();
            }
          if (name.equals("CivilStatus"))
        {
                return new Integer(getCivilStatus());
            }
          if (name.equals("ResidentialAddress"))
        {
                return getResidentialAddress();
            }
          if (name.equals("CollegeAddress"))
        {
                return getCollegeAddress();
            }
          if (name.equals("Father"))
        {
                return getFather();
            }
          if (name.equals("Mother"))
        {
                return getMother();
            }
          if (name.equals("Guardian"))
        {
                return getGuardian();
            }
          if (name.equals("GuardianContactNumber"))
        {
                return getGuardianContactNumber();
            }
          if (name.equals("GuardianAddress"))
        {
                return getGuardianAddress();
            }
          if (name.equals("GuardianRelation"))
        {
                return getGuardianRelation();
            }
          if (name.equals("GuardianEmail"))
        {
                return getGuardianEmail();
            }
          if (name.equals("IsRGEP"))
        {
                return new Integer(getIsRGEP());
            }
          if (name.equals("Zipcode"))
        {
                return new Integer(getZipcode());
            }
          if (name.equals("TelephoneNumber"))
        {
                return getTelephoneNumber();
            }
          if (name.equals("CellphoneNumber"))
        {
                return getCellphoneNumber();
            }
          if (name.equals("HighSchool"))
        {
                return getHighSchool();
            }
          if (name.equals("HighSchoolGrade"))
        {
                return new Double(getHighSchoolGrade());
            }
          if (name.equals("Email"))
        {
                return getEmail();
            }
          if (name.equals("STFAPBracket"))
        {
                return new Integer(getSTFAPBracket());
            }
          if (name.equals("Signature"))
        {
                return getSignature();
            }
          if (name.equals("Adviser"))
        {
                return getAdviser();
            }
          if (name.equals("Citizenship"))
        {
                return new Integer(getCitizenship());
            }
          if (name.equals("Country"))
        {
                return getCountry();
            }
          if (name.equals("CurriculumId"))
        {
                return new Integer(getCurriculumId());
            }
          if (name.equals("Photo"))
        {
                return getPhoto();
            }
          return null;
    }
    
    /**
     * Retrieves a field from the object by name passed in
     * as a String.  The String must be one of the static
     * Strings defined in this Class' Peer.
     *
     * @param name peer name
     * @return value
     */
    public Object getByPeerName(String name)
    {
          if (name.equals(StudentPeer.STUDENTID))
        {
                return new Integer(getStudentId());
            }
          if (name.equals(StudentPeer.STUDENTNUMBER))
        {
                return getStudentNumber();
            }
          if (name.equals(StudentPeer.FIRSTNAME))
        {
                return getFirstName();
            }
          if (name.equals(StudentPeer.MIDDLENAME))
        {
                return getMiddleName();
            }
          if (name.equals(StudentPeer.LASTNAME))
        {
                return getLastName();
            }
          if (name.equals(StudentPeer.SEX))
        {
                return getSex();
            }
          if (name.equals(StudentPeer.BIRTHDATE))
        {
                return getBirthDate();
            }
          if (name.equals(StudentPeer.CIVILSTATUS))
        {
                return new Integer(getCivilStatus());
            }
          if (name.equals(StudentPeer.RESIDENTIALADDRESS))
        {
                return getResidentialAddress();
            }
          if (name.equals(StudentPeer.COLLEGEADDRESS))
        {
                return getCollegeAddress();
            }
          if (name.equals(StudentPeer.FATHER))
        {
                return getFather();
            }
          if (name.equals(StudentPeer.MOTHER))
        {
                return getMother();
            }
          if (name.equals(StudentPeer.GUARDIAN))
        {
                return getGuardian();
            }
          if (name.equals(StudentPeer.GUARDIANCONTACTNUMBER))
        {
                return getGuardianContactNumber();
            }
          if (name.equals(StudentPeer.GUARDIANADDRESS))
        {
                return getGuardianAddress();
            }
          if (name.equals(StudentPeer.GUARDIANRELATION))
        {
                return getGuardianRelation();
            }
          if (name.equals(StudentPeer.GUARDIANEMAIL))
        {
                return getGuardianEmail();
            }
          if (name.equals(StudentPeer.ISRGEP))
        {
                return new Integer(getIsRGEP());
            }
          if (name.equals(StudentPeer.ZIPCODE))
        {
                return new Integer(getZipcode());
            }
          if (name.equals(StudentPeer.TELEPHONENUMBER))
        {
                return getTelephoneNumber();
            }
          if (name.equals(StudentPeer.CELLPHONENUMBER))
        {
                return getCellphoneNumber();
            }
          if (name.equals(StudentPeer.HIGHSCHOOL))
        {
                return getHighSchool();
            }
          if (name.equals(StudentPeer.HIGHSCHOOLGRADE))
        {
                return new Double(getHighSchoolGrade());
            }
          if (name.equals(StudentPeer.EMAIL))
        {
                return getEmail();
            }
          if (name.equals(StudentPeer.STFAPBRACKET))
        {
                return new Integer(getSTFAPBracket());
            }
          if (name.equals(StudentPeer.SIGNATURE))
        {
                return getSignature();
            }
          if (name.equals(StudentPeer.ADVISER))
        {
                return getAdviser();
            }
          if (name.equals(StudentPeer.CITIZENSHIP))
        {
                return new Integer(getCitizenship());
            }
          if (name.equals(StudentPeer.COUNTRY))
        {
                return getCountry();
            }
          if (name.equals(StudentPeer.CURRICULUMID))
        {
                return new Integer(getCurriculumId());
            }
          if (name.equals(StudentPeer.PHOTO))
        {
                return getPhoto();
            }
          return null;
    }

    /**
     * Retrieves a field from the object by Position as specified
     * in the xml schema.  Zero-based.
     *
     * @param pos position in xml schema
     * @return value
     */
    public Object getByPosition(int pos)
    {
            if (pos == 0)
        {
                return new Integer(getStudentId());
            }
              if (pos == 1)
        {
                return getStudentNumber();
            }
              if (pos == 2)
        {
                return getFirstName();
            }
              if (pos == 3)
        {
                return getMiddleName();
            }
              if (pos == 4)
        {
                return getLastName();
            }
              if (pos == 5)
        {
                return getSex();
            }
              if (pos == 6)
        {
                return getBirthDate();
            }
              if (pos == 7)
        {
                return new Integer(getCivilStatus());
            }
              if (pos == 8)
        {
                return getResidentialAddress();
            }
              if (pos == 9)
        {
                return getCollegeAddress();
            }
              if (pos == 10)
        {
                return getFather();
            }
              if (pos == 11)
        {
                return getMother();
            }
              if (pos == 12)
        {
                return getGuardian();
            }
              if (pos == 13)
        {
                return getGuardianContactNumber();
            }
              if (pos == 14)
        {
                return getGuardianAddress();
            }
              if (pos == 15)
        {
                return getGuardianRelation();
            }
              if (pos == 16)
        {
                return getGuardianEmail();
            }
              if (pos == 17)
        {
                return new Integer(getIsRGEP());
            }
              if (pos == 18)
        {
                return new Integer(getZipcode());
            }
              if (pos == 19)
        {
                return getTelephoneNumber();
            }
              if (pos == 20)
        {
                return getCellphoneNumber();
            }
              if (pos == 21)
        {
                return getHighSchool();
            }
              if (pos == 22)
        {
                return new Double(getHighSchoolGrade());
            }
              if (pos == 23)
        {
                return getEmail();
            }
              if (pos == 24)
        {
                return new Integer(getSTFAPBracket());
            }
              if (pos == 25)
        {
                return getSignature();
            }
              if (pos == 26)
        {
                return getAdviser();
            }
              if (pos == 27)
        {
                return new Integer(getCitizenship());
            }
              if (pos == 28)
        {
                return getCountry();
            }
              if (pos == 29)
        {
                return new Integer(getCurriculumId());
            }
              if (pos == 30)
        {
                return getPhoto();
            }
              return null;
    }
     
    /**
     * Stores the object in the database.  If the object is new,
     * it inserts it; otherwise an update is performed.
     *
     * @throws Exception
     */
    public void save() throws Exception
    {
          save(StudentPeer.getMapBuilder()
                .getDatabaseMap().getName());
      }

    /**
     * Stores the object in the database.  If the object is new,
     * it inserts it; otherwise an update is performed.
       * Note: this code is here because the method body is
     * auto-generated conditionally and therefore needs to be
     * in this file instead of in the super class, BaseObject.
       *
     * @param dbName
     * @throws TorqueException
     */
    public void save(String dbName) throws TorqueException
    {
        Connection con = null;
          try
        {
            con = Transaction.begin(dbName);
            save(con);
            Transaction.commit(con);
        }
        catch(TorqueException e)
        {
            Transaction.safeRollback(con);
            throw e;
        }
      }

      /** flag to prevent endless save loop, if this object is referenced
        by another object which falls in this transaction. */
    private boolean alreadyInSave = false;
      /**
     * Stores the object in the database.  If the object is new,
     * it inserts it; otherwise an update is performed.  This method
     * is meant to be used as part of a transaction, otherwise use
     * the save() method and the connection details will be handled
     * internally
     *
     * @param con
     * @throws TorqueException
     */
    public void save(Connection con) throws TorqueException
    {
          if (!alreadyInSave)
        {
            alreadyInSave = true;


  
            // If this object has been modified, then save it to the database.
            if (isModified())
            {
                if (isNew())
                {
                    StudentPeer.doInsert((Student) this, con);
                    setNew(false);
                }
                else
                {
                    StudentPeer.doUpdate((Student) this, con);
                }
            }

                                      
                
            if (collStudentClassifications != null)
            {
                for (int i = 0; i < collStudentClassifications.size(); i++)
                {
                    ((StudentClassification) collStudentClassifications.get(i)).save(con);
                }
            }
                                          
                
            if (collStudentStandings != null)
            {
                for (int i = 0; i < collStudentStandings.size(); i++)
                {
                    ((StudentStanding) collStudentStandings.get(i)).save(con);
                }
            }
                                          
                
            if (collStudentAllowedUnitss != null)
            {
                for (int i = 0; i < collStudentAllowedUnitss.size(); i++)
                {
                    ((StudentAllowedUnits) collStudentAllowedUnitss.get(i)).save(con);
                }
            }
                                          
                
            if (collStudentCurriculumTotalUnitsEarneds != null)
            {
                for (int i = 0; i < collStudentCurriculumTotalUnitsEarneds.size(); i++)
                {
                    ((StudentCurriculumTotalUnitsEarned) collStudentCurriculumTotalUnitsEarneds.get(i)).save(con);
                }
            }
                                          
                
            if (collStudentPrioritys != null)
            {
                for (int i = 0; i < collStudentPrioritys.size(); i++)
                {
                    ((StudentPriority) collStudentPrioritys.get(i)).save(con);
                }
            }
                                          
                
            if (collPlanOfCourseWorks != null)
            {
                for (int i = 0; i < collPlanOfCourseWorks.size(); i++)
                {
                    ((PlanOfCourseWork) collPlanOfCourseWorks.get(i)).save(con);
                }
            }
                                          
                
            if (collGrades != null)
            {
                for (int i = 0; i < collGrades.size(); i++)
                {
                    ((Grade) collGrades.get(i)).save(con);
                }
            }
                                          
                
            if (collRecommendedCourses != null)
            {
                for (int i = 0; i < collRecommendedCourses.size(); i++)
                {
                    ((RecommendedCourse) collRecommendedCourses.get(i)).save(con);
                }
            }
                                          
                
            if (collSlots != null)
            {
                for (int i = 0; i < collSlots.size(); i++)
                {
                    ((Slot) collSlots.get(i)).save(con);
                }
            }
                          alreadyInSave = false;
        }
      }


                          
      /**
     * Set the PrimaryKey using ObjectKey.
     *
     * @param  studentId ObjectKey
     */
    public void setPrimaryKey(ObjectKey key)
        throws TorqueException
    {
            setStudentId(((NumberKey) key).intValue());
        }

    /**
     * Set the PrimaryKey using a String.
     *
     * @param key
     */
    public void setPrimaryKey(String key) throws TorqueException
    {
            setStudentId(Integer.parseInt(key));
        }

  
    /**
     * returns an id that differentiates this object from others
     * of its class.
     */
    public ObjectKey getPrimaryKey()
    {
          return SimpleKey.keyFor(getStudentId());
      }

 

    /**
     * Makes a copy of this object.
     * It creates a new object filling in the simple attributes.
       * It then fills all the association collections and sets the
     * related objects to isNew=true.
       */
      public Student copy() throws TorqueException
    {
        return copyInto(new Student());
    }
  
    protected Student copyInto(Student copyObj) throws TorqueException
    {
          copyObj.setStudentId(studentId);
          copyObj.setStudentNumber(studentNumber);
          copyObj.setFirstName(firstName);
          copyObj.setMiddleName(middleName);
          copyObj.setLastName(lastName);
          copyObj.setSex(sex);
          copyObj.setBirthDate(birthDate);
          copyObj.setCivilStatus(civilStatus);
          copyObj.setResidentialAddress(residentialAddress);
          copyObj.setCollegeAddress(collegeAddress);
          copyObj.setFather(father);
          copyObj.setMother(mother);
          copyObj.setGuardian(guardian);
          copyObj.setGuardianContactNumber(guardianContactNumber);
          copyObj.setGuardianAddress(guardianAddress);
          copyObj.setGuardianRelation(guardianRelation);
          copyObj.setGuardianEmail(guardianEmail);
          copyObj.setIsRGEP(isRGEP);
          copyObj.setZipcode(zipcode);
          copyObj.setTelephoneNumber(telephoneNumber);
          copyObj.setCellphoneNumber(cellphoneNumber);
          copyObj.setHighSchool(highSchool);
          copyObj.setHighSchoolGrade(highSchoolGrade);
          copyObj.setEmail(email);
          copyObj.setSTFAPBracket(sTFAPBracket);
          copyObj.setSignature(signature);
          copyObj.setAdviser(adviser);
          copyObj.setCitizenship(citizenship);
          copyObj.setCountry(country);
          copyObj.setCurriculumId(curriculumId);
          copyObj.setPhoto(photo);
  
                    copyObj.setStudentId(0);
                                                                                                                                                                                                
                                      
                
        List v = getStudentClassifications();
        for (int i = 0; i < v.size(); i++)
        {
            StudentClassification obj = (StudentClassification) v.get(i);
            copyObj.addStudentClassification(obj.copy());
        }
                                                  
                
        v = getStudentStandings();
        for (int i = 0; i < v.size(); i++)
        {
            StudentStanding obj = (StudentStanding) v.get(i);
            copyObj.addStudentStanding(obj.copy());
        }
                                                  
                
        v = getStudentAllowedUnitss();
        for (int i = 0; i < v.size(); i++)
        {
            StudentAllowedUnits obj = (StudentAllowedUnits) v.get(i);
            copyObj.addStudentAllowedUnits(obj.copy());
        }
                                                  
                
        v = getStudentCurriculumTotalUnitsEarneds();
        for (int i = 0; i < v.size(); i++)
        {
            StudentCurriculumTotalUnitsEarned obj = (StudentCurriculumTotalUnitsEarned) v.get(i);
            copyObj.addStudentCurriculumTotalUnitsEarned(obj.copy());
        }
                                                  
                
        v = getStudentPrioritys();
        for (int i = 0; i < v.size(); i++)
        {
            StudentPriority obj = (StudentPriority) v.get(i);
            copyObj.addStudentPriority(obj.copy());
        }
                                                  
                
        v = getPlanOfCourseWorks();
        for (int i = 0; i < v.size(); i++)
        {
            PlanOfCourseWork obj = (PlanOfCourseWork) v.get(i);
            copyObj.addPlanOfCourseWork(obj.copy());
        }
                                                  
                
        v = getGrades();
        for (int i = 0; i < v.size(); i++)
        {
            Grade obj = (Grade) v.get(i);
            copyObj.addGrade(obj.copy());
        }
                                                  
                
        v = getRecommendedCourses();
        for (int i = 0; i < v.size(); i++)
        {
            RecommendedCourse obj = (RecommendedCourse) v.get(i);
            copyObj.addRecommendedCourse(obj.copy());
        }
                                                  
                
        v = getSlots();
        for (int i = 0; i < v.size(); i++)
        {
            Slot obj = (Slot) v.get(i);
            copyObj.addSlot(obj.copy());
        }
                    
        return copyObj;
    }

    /**
     * returns a peer instance associated with this om.  Since Peer classes
     * are not to have any instance attributes, this method returns the
     * same instance for all member of this class. The method could therefore
     * be static, but this would prevent one from overriding the behavior.
     */
    public StudentPeer getPeer()
    {
        return peer;
    }

    public String toString()
    {
        StringBuffer str = new StringBuffer();
        str.append("Student:\n");
        str.append("StudentId = ")
           .append(getStudentId())
           .append("\n");
        str.append("StudentNumber = ")
           .append(getStudentNumber())
           .append("\n");
        str.append("FirstName = ")
           .append(getFirstName())
           .append("\n");
        str.append("MiddleName = ")
           .append(getMiddleName())
           .append("\n");
        str.append("LastName = ")
           .append(getLastName())
           .append("\n");
        str.append("Sex = ")
           .append(getSex())
           .append("\n");
        str.append("BirthDate = ")
           .append(getBirthDate())
           .append("\n");
        str.append("CivilStatus = ")
           .append(getCivilStatus())
           .append("\n");
        str.append("ResidentialAddress = ")
           .append(getResidentialAddress())
           .append("\n");
        str.append("CollegeAddress = ")
           .append(getCollegeAddress())
           .append("\n");
        str.append("Father = ")
           .append(getFather())
           .append("\n");
        str.append("Mother = ")
           .append(getMother())
           .append("\n");
        str.append("Guardian = ")
           .append(getGuardian())
           .append("\n");
        str.append("GuardianContactNumber = ")
           .append(getGuardianContactNumber())
           .append("\n");
        str.append("GuardianAddress = ")
           .append(getGuardianAddress())
           .append("\n");
        str.append("GuardianRelation = ")
           .append(getGuardianRelation())
           .append("\n");
        str.append("GuardianEmail = ")
           .append(getGuardianEmail())
           .append("\n");
        str.append("IsRGEP = ")
           .append(getIsRGEP())
           .append("\n");
        str.append("Zipcode = ")
           .append(getZipcode())
           .append("\n");
        str.append("TelephoneNumber = ")
           .append(getTelephoneNumber())
           .append("\n");
        str.append("CellphoneNumber = ")
           .append(getCellphoneNumber())
           .append("\n");
        str.append("HighSchool = ")
           .append(getHighSchool())
           .append("\n");
        str.append("HighSchoolGrade = ")
           .append(getHighSchoolGrade())
           .append("\n");
        str.append("Email = ")
           .append(getEmail())
           .append("\n");
        str.append("STFAPBracket = ")
           .append(getSTFAPBracket())
           .append("\n");
        str.append("Signature = ")
           .append(getSignature())
           .append("\n");
        str.append("Adviser = ")
           .append(getAdviser())
           .append("\n");
        str.append("Citizenship = ")
           .append(getCitizenship())
           .append("\n");
        str.append("Country = ")
           .append(getCountry())
           .append("\n");
        str.append("CurriculumId = ")
           .append(getCurriculumId())
           .append("\n");
        str.append("Photo = ")
           .append(getPhoto())
           .append("\n");
        return(str.toString());
    }
}
